/**
 * @author Jun
 * on Jun 26, 2012, 2012
 */
package com.fastwire.carriere.rad.entityVo;

import org.simpleframework.xml.Element;

import com.fastwire.carriere.common.constant.AppConstants;
import com.fastwire.carriere.rad.entity.RadTermPoint;

/**
 * @author Jun
 * on Jun 26, 2012, 2012
 */
public class RadTermPointVo
{
    @Element(required = false)
    private int slot;  
    
    @Element(required = false)
    private int port;  // index
    
    @Element(required = false)
    private String descr;

    @Element(required = false)
    private int type;

    @Element(required = false)
    private int mtu;
    @Element(required = false)
    private long speed;
    @Element(required = false)
    private String physAddress;
    @Element(required = false)
    private String adminStatus;  // 1: up, 2 down
    @Element(required = false)
    private String operStatus;   // 1: up, 2 down

    
    @Element(required = false)
    private String status; // active or inactive
    

    public RadTermPointVo()
    {
        // TODO Auto-generated constructor stub
    }

    /**
     * @param tp
     */
    public RadTermPointVo(RadTermPoint tp)
    {
        this.slot   = tp.getSlot();
        this.port   = tp.getPort();
        this.descr  = tp.getDescr();
        this.status = tp.getStatus();
        
        this.type   = tp.getType();
        this.mtu    = tp.getMtu();
        this.operStatus = tp.getOperStatus();
        this.adminStatus = tp.getAdminStatus();
        this.physAddress = tp.getPhysAddress();
        this.speed = tp.getSpeed();

    }


    /**
     * @return the slot
     */
    public int getSlot()
    {
        return slot;
    }

    /**
     * @param slot the slot to set
     */
    public void setSlot(int slot)
    {
        this.slot = slot;
    }

    /**
     * @return the port
     */
    public int getPort()
    {
        return port;
    }

    /**
     * @param port the port to set
     */
    public void setPort(int port)
    {
        this.port = port;
    }


    
    /**
     * @return the status
     */
    public String getStatus()
    {
        return status;
    }


    /**
     * @param status the status to set
     */
    public void setStatus(String status)
    {
        this.status = status;
    }
    
    public void invalidate()
    {
        setStatus(AppConstants.NE_STATUS_INACTIVE);
    }

    /**
     * @return the descr
     */
    public String getDescr()
    {
        return descr;
    }

    /**
     * @param descr the descr to set
     */
    public void setDescr(String descr)
    {
        this.descr = descr;
    }

    /**
     * @return the type
     */
    public int getType()
    {
        return type;
    }

    /**
     * @param type the type to set
     */
    public void setType(int type)
    {
        this.type = type;
    }

    /**
     * @return the mtu
     */
    public int getMtu()
    {
        return mtu;
    }

    /**
     * @param mtu the mtu to set
     */
    public void setMtu(int mtu)
    {
        this.mtu = mtu;
    }

    /**
     * @return the speed
     */
    public long getSpeed()
    {
        return speed;
    }

    /**
     * @param speed the speed to set
     */
    public void setSpeed(long speed)
    {
        this.speed = speed;
    }

    /**
     * @return the physAddress
     */
    public String getPhysAddress()
    {
        return physAddress;
    }

    /**
     * @param physAddress the physAddress to set
     */
    public void setPhysAddress(String physAddress)
    {
        this.physAddress = physAddress;
    }

    /**
     * @return the adminStatus
     */
    public String getAdminStatus()
    {
        return adminStatus;
    }

    /**
     * @param adminStatus the adminStatus to set
     */
    public void setAdminStatus(String adminStatus)
    {
        this.adminStatus = adminStatus;
    }

    /**
     * @return the operStatus
     */
    public String getOperStatus()
    {
        return operStatus;
    }

    /**
     * @param operStatus the operStatus to set
     */
    public void setOperStatus(String operStatus)
    {
        this.operStatus = operStatus;
    }
    
}
